package cn.edu.scau.cmi.liyetian.client.finalClient;

import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.ResourceBundle;

import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;

import cn.edu.scau.cmi.liyetian.client.AbstractFactoryClient;
import cn.edu.scau.cmi.liyetian.client.AdapterClient;
import cn.edu.scau.cmi.liyetian.client.ConsistentCompositeClient;
import cn.edu.scau.cmi.liyetian.client.FactoryClient;
import cn.edu.scau.cmi.liyetian.client.InterProgrammingClient;
import cn.edu.scau.cmi.liyetian.client.SafeCompositeClient;
import cn.edu.scau.cmi.liyetian.client.SimpleFactoryMethodClient;
import cn.edu.scau.cmi.liyetian.client.SingletonClient;
import cn.edu.scau.cmi.liyetian.client.hibernate.AdminClient;
import cn.edu.scau.cmi.liyetian.client.spring.Spring02Client;
import javafx.stage.Stage;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;

public class MainController implements Initializable {
	public List<String> list = new ArrayList<String>();

	public static Thread thread = null;

	String str = "";

	@FXML
	private Button myButton;

	@FXML
	private TextField myTextField;

	@FXML
	private Button mybutton2;

	@FXML
	private TextField myTextField2;

	@FXML
	private TextArea myTextarea;

	@Override
	public void initialize(URL location, ResourceBundle resources) {

	}

	//2
	public void openSingleton(ActionEvent event) {
		SingletonClient sc = new SingletonClient();
		sc.show();
	}
	//1
	public void baseCoding(ActionEvent event) {
		InterProgrammingClient.main(null);
	}
	//3
	public void openSingleFactory(ActionEvent event) {
		SimpleFactoryMethodClient.main(null);
	}
	//9
	public void openFactoryClient(ActionEvent event) {
		FactoryClient.main(null);
	}
	//8
	public void openAbstractFactoryClient(ActionEvent event) {
		AbstractFactoryClient.main(null);
	}
	//4
	public void openAdapterClient(ActionEvent event) {
		AdapterClient ac = new AdapterClient();
		ac.show();
	}
	//5
	public void openConsistentCompositeClient(ActionEvent event) {
		ConsistentCompositeClient.main(null);
	}
	//10
	public void openSafeCompositeClient(ActionEvent event) {
		SafeCompositeClient.main(null);
	}
	//6
	public void openHibernateDaoClient(ActionEvent event) {
		AdminClient.main(null);
	}
	//7
	public void openSpringHibernateClient(ActionEvent event) {
		Spring02Client.main(null);
	}
}
